package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchAlarmAreaMapper;
import com.ruoyi.system.domain.DispatchAlarmArea;
import com.ruoyi.system.service.IDispatchAlarmAreaService;

/**
 * 区域预警Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchAlarmAreaServiceImpl implements IDispatchAlarmAreaService 
{
    @Autowired
    private DispatchAlarmAreaMapper dispatchAlarmAreaMapper;

    /**
     * 查询区域预警
     * 
     * @param alarmAreaId 区域预警主键
     * @return 区域预警
     */
    @Override
    public DispatchAlarmArea selectDispatchAlarmAreaByAlarmAreaId(Long alarmAreaId)
    {
        return dispatchAlarmAreaMapper.selectDispatchAlarmAreaByAlarmAreaId(alarmAreaId);
    }

    /**
     * 查询区域预警列表
     * 
     * @param dispatchAlarmArea 区域预警
     * @return 区域预警
     */
    @Override
    public List<DispatchAlarmArea> selectDispatchAlarmAreaList(DispatchAlarmArea dispatchAlarmArea)
    {
        return dispatchAlarmAreaMapper.selectDispatchAlarmAreaList(dispatchAlarmArea);
    }

    /**
     * 新增区域预警
     * 
     * @param dispatchAlarmArea 区域预警
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchAlarmArea(DispatchAlarmArea dispatchAlarmArea)
    {
        return dispatchAlarmAreaMapper.insertDispatchAlarmArea(dispatchAlarmArea);
    }

    /**
     * 修改区域预警
     * 
     * @param dispatchAlarmArea 区域预警
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchAlarmArea(DispatchAlarmArea dispatchAlarmArea)
    {
        return dispatchAlarmAreaMapper.updateDispatchAlarmArea(dispatchAlarmArea);
    }

    /**
     * 批量删除区域预警
     * 
     * @param alarmAreaIds 需要删除的区域预警主键
     * @return 结果
     */
    @Override
    public int deleteDispatchAlarmAreaByAlarmAreaIds(Long[] alarmAreaIds)
    {
        return dispatchAlarmAreaMapper.deleteDispatchAlarmAreaByAlarmAreaIds(alarmAreaIds);
    }

    /**
     * 删除区域预警信息
     * 
     * @param alarmAreaId 区域预警主键
     * @return 结果
     */
    @Override
    public int deleteDispatchAlarmAreaByAlarmAreaId(Long alarmAreaId)
    {
        return dispatchAlarmAreaMapper.deleteDispatchAlarmAreaByAlarmAreaId(alarmAreaId);
    }
}
